package cn.tedu.yitu.protocol.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 用户登录的参数类
 *
 * @author java@tedu.cn
 * @version 3.0
 */
@Data
public class UserLoginInfoParam implements Serializable {

    /**
     * 用户名
     */
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^[0-9_]{11}$", message = "请填写11位手机号")
    @ApiModelProperty(value = "手机号", required = true, example = "13800000000")
    private String phoneNum;

    /**
     * 密码（原文）
     */
    @NotNull(message = "请填写密码")
    @Pattern(regexp = "^[A-Z]{1}[a-zA-Z0-9_]{5,14}$", message = "密码必须是6~15位大小写字母和数字组成")
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;

}
